import vuePlugin from 'eslint-plugin-vue'
import js from '@eslint/js'
import vueParser from 'vue-eslint-parser'

export default [
  js.configs.recommended,
  ...vuePlugin.configs['flat/recommended'],
  {
    languageOptions: {
      ecmaVersion: 'latest',
      sourceType: 'module',
      parser: vueParser,
      parserOptions: {
        parser: '@babel/eslint-parser',
        extraFileExtensions: ['.vue']
      },
      globals: {
        process: 'readonly',
        console: 'readonly'
      }
    },
    rules: {
      'vue/multi-word-component-names': 'off',
      'vue/no-parsing-error': [2, { 'invalid-first-character-of-tag-name': false }],
      'no-undef': 'off',
      'vue/no-v-html': 'off'
    }
  }
]
